package 方法使用;

//形参和实参的联系

public class test04 {
    public static void main(String[] args) {

        getsum(10, 20);  //形参赋值给实参

        int x = 15;
        int y = 20;
        getsum(x, y);    //形参赋值给实参
    }

    public static void getsum(int x, int y) {
        int sum = x + y;
        System.out.println(sum);
    }
}
